@extends('home.layout.layout')
@section('title',"HP论坛")
<head>
	<link rel="shortcut icon" rel="stylesheet" href="{{asset('/HomeCss/images/favicon.ico')}}"/>
        
    <link type="text/css" rel="stylesheet" href="{{asset('/HomeCss/homepage/css/common.gb2312-v1.css')}}"/>
    
    <script src="{{asset('/HomeCss/homepage/js/dace.js')}}">
    </script>
    <script src="{{asset('/HomeCss/homepage/js/common.gb2312-v1.js')}}">
    </script>
    <script src="{{asset('/HomeCss/homepage/js/jquery.js')}}" type="text/javascript">
    </script>
    <script type="text/javascript" src="{{asset('/HomeCss/homepage/js/sjqqapi.js')}}" charset="utf-8">
    </script>
    <script type="text/javascript" src="{{asset('/HomeCss/homepage/js/ckplayer.js')}}" charset="utf-8">
    </script>
    <script src="{{asset('/HomeCss/homepage/js/game.20121123.js')}}" type="text/javascript">
    </script>
    <script src="{{asset('/HomeCss/homepage/js/index-v3.js')}}" type="text/javascript">
	</script>
    <link href="{{asset('/HomeCss/homepage/css/index-v4.css')}}" rel="stylesheet" type="text/css" />
    <link rel="canonical" href="//nba.hupu.com/" />
    <style type="text/css">
	.text h3 {
		    height: 60px;
		    line-height: 60px;
		    overflow: hidden;
		}
	h3{font-size:15px;}
    </style>
</head>
@section('con')
<div class='row'style='border:2px solid #EAEEF0;margin:0px 74px;'>
	<div class='col-sm-4' style='width:33.3%;min-height:600px;border-right:1px solid #EAEEF0'>
	<h1><span class="label label-default">新闻</span></h1>
		<h3 style='font-size:15px;'>热门新闻</h3>
		<div class="text">
			@foreach($news as $k=>$v)		
            <h3>                
                <a href="/home/news/detial?nid->{{$v->nid}}" target="_blank">
                    {{$v->ntitle}}
                </a>
                <span>{{$v->nctime}}</span>
            </h3>
            @endforeach
            <hr>
        </div>
        <br>
        <a href="/home/news" target="_blank">>
            <h2>更多新闻&raquo;</h2>
        </a>
        <hr>
	</div>
	<div class='col-sm-4' style='width:33.3%;min-height:600px;border-right:1px solid #EAEEF0'>
		<div class="center">
			<h1><span class="label label-default">论坛</span></h1>
	        <div class="">
	            <!--hotstart-->	           
	            <h3 style='font-size:15px;'>热帖</h3>               
                <ul>
                @foreach($order as $k=>$v)
	                <li class="qu">               
	                </li>
	                <li>
	                    <div>
	                    <h3>
	                        <a href="/home/post/info?pid={{$v->pid}}" target="_blank" alt="" title="{{$v->pname}}">
	                            {{$v->pname}}
	                        </a>
		                    <span style='float:right;'>
		                     阅览量:{{$v->fnum}}&nbsp;&nbsp;回复:{{$v->ctr}}
		                    </span>
		                </h3>
	                    </div>
	                    
	                </li>
	                <div class="clear">
	                </div>
	            @endforeach
	            <!--hotend-->
	        </div>
	        <hr>
	        <h3 style='font-size:15px;'>NBA区版块</h3> 
			@foreach($nba as $k=>$v)
			<div style='position:relative;'>
				<span style='font-size:14px'><b>{{$v->bname}}</b></span>
                <button class="btn btn-outline btn-link" type="button" style='position:absolute;left:320px;top:-10px;' bid="{{$v->bid}}">关注</button>
            	<hr>
            </div>
            @endforeach
            <h3 style='font-size:15px;'>交易区版块</h3> 
			@foreach($deal as $k=>$v)
			<div style='position:relative;'>
				<span style='font-size:14px'><b>{{$v->bname}}</b></span>
                <button class="btn btn-outline btn-link" type="button" style='position:absolute;left:320px;top:-10px;' bid="{{$v->bid}}">关注</button>
            	<hr>
            </div>
            @endforeach
            <h3 style='font-size:15px;'>技术区版块</h3> 
			@foreach($skill as $k=>$v)
			<div style='position:relative;'>
				<span style='font-size:14px'><b>{{$v->bname}}</b></span>
                <button class="btn btn-outline btn-link" type="button" style='position:absolute;left:320px;top:-10px;' bid='{{$v->bid}}'>关注</button>
            	<hr>
            </div>
            @endforeach
	    </div>		
	</div>
	<div class='col-sm-4' style='width:33.3%;min-height:600px;'>
		<div class="center"> 
			<h1><span class="label label-default">识货</span></h1>                      
            <div class="clear">
            </div>
            <div class="list">
            <h3 style='font-size:15px;'>热卖商品</h3>
            @foreach($goods as $k=>$v)
                <div class="top_imgs" style="position:relative;">
                    <div class="top_imgs_a">
                        <a target="_blank" href="/home/shihuo/details?gid={{$v->gid}}">
                            <img width="130" height="80" src="{{asset($v->gpic)}}">
                        </a>
                        <a style="color:#990000;position:absolute;left:150px;top:0px;" target="_blank" href="/home/shihuo/details?gid={{$v->gid}}">
                            {{$v->gname}}
                        </a>
                        <div style="position:absolute;left:150px;top:25px;overflow:hidden;text-overflow:ellipsis;">
	                        <p>
	                            {!! $v->gintro !!}
	                        </p>
                        </div>
                    </div>
                </div>
                <br>
			@endforeach
                <div style="clear:both;">
                </div>
            </div>
            <div style="clear:both;">
            </div>
        </div>
	</div>
</div>
@endsection
@section('js')
<script type="text/javascript">
	$('.btn-link').click(function(){
		var bid=$(this).attr('bid');
		$.get('/home/shouye/guanzhu',{bid:bid},function(data){
			if(data==2){
				alert('关注成功');
			}else if(data==3){
				alert('关注失败');
			}else if(data==1){
				alert('您已关注...');
			}
			else{
				alert('您还未登录...');
			}

		})
	})

</script>
@endsection